fix(auth): enforce deterministic, scope-safe cursor pagination in <endpoint> - #1684
Merged
Baskarayelu merged 2 commits intoAug 29, 2026
Merged
Conversation
Implements deterministic, scope-safe cursor-based pagination for sessions, tokens, and recovery requests. Addresses Remitwise-Org#1646. - Opaque cursors with Fletcher-16 integrity checksum - Scope-safe: cursors bound to specific subjects - Page limits enforced (1-100, default 20) - Paginated queries: list_sessions, list_tokens, list_requests - 51 new pagination tests (163 total passing) Closes Remitwise-Org#1646 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1646
Summary
Problem
<What was previously undefined or unsafe: e.g. cursor not tied to a stable sort key,
no explicit page-limit validation, end-of-stream signaled ambiguously, or concurrent
inserts able to shift results across a page boundary causing skip/duplicate/leak.>
Design & Invariants
authorized scope
Changes
<path>:<path>:Failure Behavior & Compatibility
<error type/shape>, no partial results returnedTest Evidence
Cases tested against actual integration boundary:
Concurrency/replay:
Commands Run
```
<formatter command + result>
<lint command + result>
<type/build command + result>
<full test suite command + result>
<security/contract check command + result, if applicable>
```
Security / Correctness Note
<1 short paragraph: what this guarantees (no cross-scope leakage, deterministic
ordering under concurrent writes), what it does not cover, any residual limitation
or assumption — e.g. behavior under schema migration, cursor lifetime.>
Scope Confirmation